﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NUnitResults
{
    /// <summary>
    /// Provides test result details.
    /// </summary>
    public interface ITestResult
    {
        /// <summary>
        /// Gets the name of this test/test container.
        /// </summary>
        String Name { get; }

        /// <summary>
        /// Gets the full name of this test result.
        /// </summary>
        String FullName { get; }

        /// <summary>
        /// Gets the namespace of this result.
        /// </summary>
        String Namespace { get; }

        /// <summary>
        /// Gets the status of the test/test container.
        /// </summary>
        Status Status { get; }

        /// <summary>
        /// Gets the number of test cases represented by this test/test container.
        /// </summary>
        TestCaseCount TestCaseCount { get; }

        /// <summary>
        /// Gets the type of this result.
        /// </summary>
        SuiteType SuiteType { get; }

        /// <summary>
        /// Gets this result's sub-results.
        /// </summary>
        IList<ITestResult> InnerCases { get; }

        /// <summary>
        /// Applies the supplied action to this ITestResult and all sub-results.
        /// </summary>
        /// <param name="action"></param>
        void Iterate(Action<ITestResult> action);
    }
}
